-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Moneta as entity and metastore #78
Conversation
I don't want moneta as a hard dependency but would consider a meta/entity store implementation backed by moneta. I just don't want moneta to be a requirement for using rack-cache basically. |
What do you think about removing the special implementations from rack-cache and only include a basic memory implementation? Then you wouldn't have the hard moneta dependency (I agree on that this would be better) and we would avoid code duplication and combine the efforts. Take a look at the code reduction (-1200 lines in rack-cache). Btw. I already have a moneta rack-cache implementation included in moneta. |
Oh nice. I didn't know that. We could most certainly include documentation in the README and whatnot on using this for all of moneta's supported stores.
I'd be for removing everything except memory, memcached, file, and moneta. I'm realizing I really don't want to merge the mongo store in #49 because I'm afraid I won't be able to maintain it through version upgrades and whatnot. Still, I want rack-cache to be usable in the most popular production configurations (memcached meta store, file entity store) without the moneta dependency. Those stores are also pretty easy to maintain. |
Ok, I agree! I create a patch! We will keep memory, memcached, file and moneta. Is it okay for you to redesign it in such a way that the remaining stores match the moneta interface? This would make it simpler and cleaner. |
Moneta wouldn't need a specific rack-cache store implementation then, you could just drop it in. |
@rtomayko: Still interested in this? |
@minad: Yeah the general direction seems good to me.
Ummmm that's kind of tricky. The store interface is semi important to keep compatible for a stable release since you can write your own stores and environments like Rails have indeed done this. We'd have to make a major release to change the store interface expected by the core of rack-cache. |
So are you willing to change the cache store interface to something Moneta-like in a major release? I could then make the changes as discussed (Keep memory, memcached, file but with Moneta interface, thus allowing Moneta to be used as drop-in-replacement) |
This patch replaces the entire storage system with Moneta which simplifies things a lot. Soon there will be a new Moneta release. I think rack-cache should concentrate on caching and since there are many open issues I think this is the way to go.
This would also solve the issues #67 and #49.
This patch needs more cleanup, it is just a quick hack and a proof of concept. Are you interested?